home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Modules / BackSpaceModules / Source / BattleView / Misc.h < prev    next >
Text File  |  1994-05-04  |  2KB  |  60 lines

  1. /* Misc.h -- Various defines used in the program
  2.    Copyright (C) 1992, 1993 David A. Strout
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18. /* Written by David Strout <dstrout@isi.edu>. */
  19.  
  20.  
  21.  
  22. #define NUMSHIPS 8 /* Number of ships on each side */
  23.  
  24. #define RANDINT(n) (random() % ((n)+1))        /* Random integer 0..n */
  25. #define ONEIN(n)   ((random() % (n)) == 0)    /* TRUE one in n times */
  26. #define INITRAND   srandom(time(0))        /* Randomizer */
  27.  
  28. #define MAX_DAM 1000 /* Zero means destroyed */
  29. #define FED_DAM 100 /* Damage a Federation shot does */
  30. #define KLI_DAM 50 /* Damage a Klingon shot does */
  31.  
  32. #define SHOTS_PER_FRAME 1
  33.  
  34. #define NEW_HEAD 50 /* change direction one in NEW_HEAD frames */
  35.  
  36. #define FED 0
  37. #define KLI 1
  38.  
  39. #define BORDER 8 /* in base co-ord units */
  40.  
  41. #define EXPLODE0 0
  42. #define EXPLODE1 1
  43. #define EXPLODE2 2
  44. #define EXPLODE3 3
  45. #define EXPLODE4 4
  46. #define EXPLODE5 5
  47. #define EXPLODE6 6
  48. #define EXPLODE7 7
  49. #define DEAD 8
  50. #define OK 9
  51.  
  52. #define NORTH 0
  53. #define NEAST 1
  54. #define EAST 2
  55. #define SEAST 3
  56. #define SOUTH 4
  57. #define SWEST 5
  58. #define WEST 6
  59. #define NWEST 7
  60.